using JESAI.Platform.AutoUpdate;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using NLog.Extensions.Logging;

IHost host = Host.CreateDefaultBuilder(args)
    .ConfigureServices(services =>
    {
        services.AddLogging(loggingBuilder =>
        {
            loggingBuilder.AddNLog();
        });
        services.AddHostedService<Worker>();
        services.AddHostedService<AutoUpdateVersionWorker>();
    })
    .UseWindowsService()
    .Build();

await host.RunAsync();
